package com.example.appresult.common;

//定义返回结果的枚举类型
public enum ResultCode {
    SUCESS(0,"操作成功"),
    FAILED(1000,"操作失败");
    int code;
    String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "code = " + code + ", message = " + message + ". ";
    }
}
